tests: Make accessibility-dump output selected children by name
authorBenjamin Otte <otte@redhat.com>
Wed, 29 Jun 2011 16:11:07 +0000 (18:11 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Jul 2011 20:08:56 +0000 (16:08 -0400)
And put one child in every row to make diffing easier.

tests/a11y/about.txt
tests/a11y/accessibility-dump.c
tests/a11y/notebook.txt
tests/a11y/tree.txt

index 6bf8e886d9290a313cdef992ef1b7e95d4a4d862..58cca1d5c8e5ba7c1fcc7eee49262dfb25320d78 100644 (file)
@@ -87,7 +87,7 @@ window1
         alpha: 1
         <AtkSelection>
         selection count: 1
-        selected children: 0
+        selected children: unnamed-GailNotebookPage-4
         unnamed-GailNotebookPage-4
           "page tab"
           parent: unnamed-GailNotebook-3
index 1a1c21379c34ec47a3481672ee7ee1d5311f65d0..38093ca5f959642176b98c0d9286676a315f3a10 100644 (file)
@@ -402,14 +402,20 @@ dump_atk_selection (AtkSelection *atk_selection,
     {
       if (atk_selection_is_child_selected (atk_selection, i))
         {
+          AtkObject *object = atk_object_ref_accessible_child (ATK_OBJECT (atk_selection), i);
+          
+          g_assert (object);
+          
           if (n_counted_selections == 0)
-            g_string_append_printf (string, "%*sselected children:", depth, "");
-          g_string_append_printf (string, " %d", i);
+            {
+              g_string_append_printf (string, "%*sselected children: %s\n", depth, "", get_name (object));
+              depth += strlen ("selected children: ");
+            }
+          else
+            g_string_append_printf (string, "%*s%s\n", depth, "", get_name (object));
           n_counted_selections++;
         }
     }
-  if (n_counted_selections)
-    g_string_append_c (string, '\n');
   
   g_assert_cmpint (n_selections, ==, n_counted_selections);
 }
index c363093e0da71764d6036222dc5f11c72b074ac8..a5176653603f4cc7d7c1b155bddb9561a69dbc34 100644 (file)
@@ -17,7 +17,7 @@ window1
     alpha: 1
     <AtkSelection>
     selection count: 1
-    selected children: 0
+    selected children: Tab 1
     Tab 1
       "page tab"
       parent: notebook1
index cef74987a333ca47c9f220e030e622875c566da0..0713b5ee75db7d14608b41753928a864254e3695 100644 (file)
@@ -17,7 +17,8 @@ window1
     alpha: 1
     <AtkSelection>
     selection count: 2
-    selected children: 2 3
+    selected children: One
+                       Two
     <AtkTable>
     rows: 4
     columns: 2